/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-17 18:04:22
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-18 07:25:34
 */
import 'package:flutter/material.dart';
import 'package:flutter_data_center/components/loading.dart';
import 'package:flutter_data_center/controller/wristband_controller.dart';
import 'package:get/get.dart';

import 'wristband_item.dart';

class WristbandList extends StatelessWidget {
  const WristbandList({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) => GetBuilder<WristbandController>(
        builder: (_controller) => _controller.list.length > 0
            ? ListView.builder(
                physics: BouncingScrollPhysics(),
                itemCount: _controller.list.length,
                itemBuilder: (BuildContext context, int index) => WristbandItem(
                    wristband: _controller.list[index], index: index),
              )
            : Loading(),
      );
}
